#!/bin/bash
[% c("var/set_default_env") -%]
# This script is for #40933:
#   Fix generating incrementals between 12.5.x and 13.0
[% FOREACH version = c("var/torbrowser_incremental_from") %]
  cd [% shell_quote(path(dest_dir)) %]/[% IF c("var/unsigned_releases_dir") %]un[% END %]signed/[% version %]
  test -e [% c("var/project-name") %]-linux-i686-[% version %]_ALL.mar || \
    ln -s [% c("var/project-name") %]-linux32-[% version %]_ALL.mar \
          [% c("var/project-name") %]-linux-i686-[% version %]_ALL.mar
  test -e [% c("var/project-name") %]-linux-x86_64-[% version %]_ALL.mar || \
    ln -s [% c("var/project-name") %]-linux64-[% version %]_ALL.mar \
          [% c("var/project-name") %]-linux-x86_64-[% version %]_ALL.mar
  test -e [% c("var/project-name") %]-windows-i686-[% version %]_ALL.mar || \
    ln -s [% c("var/project-name") %]-win32-[% version %]_ALL.mar \
          [% c("var/project-name") %]-windows-i686-[% version %]_ALL.mar
  test -e [% c("var/project-name") %]-windows-x86_64-[% version %]_ALL.mar || \
    ln -s [% c("var/project-name") %]-win64-[% version %]_ALL.mar \
          [% c("var/project-name") %]-windows-x86_64-[% version %]_ALL.mar
[% END -%]
